import React, { Component } from 'react';
import { Route, Switch, Redirect } from 'react-router-dom'
// 任务详情/taskInfo
import  TaskInfo  from 'pages/hall/childrenView/TaskInfo'
// 创建任务类型/createTaskType
import CreateTaskType from 'pages/hall/childrenView/CreateTaskType'
// 创建任务内容/createTaskContent
import CreateTaskContent from 'pages/hall/childrenView/CreateTaskContent'
// 创建任务结果/createTaskResult
import CreateTaskResult from 'pages/hall/childrenView/CreateTaskResult'

class HallChildRouter extends Component {
  render() {
    return (
      <Switch>
        {/* 任务详情 */}
        <Route path="/hallChildRouter/taskInfo/:id" component={TaskInfo}></Route>

        {/* 发布任务结果 */}
        <Route path="/hallChildRouter/createTaskResult" component={CreateTaskResult}></Route>

        {/* 发布任务类型 */}
        <Route path="/hallChildRouter/createTaskType" component={CreateTaskType}></Route>

        {/* 发布任务内容 */}
        <Route path="/hallChildRouter/createTaskContent" component={CreateTaskContent}></Route>

        {/* 重定向 */}
        <Redirect from="/hallChildRouter" to="/index/hall" exact></Redirect>

      </Switch>
    );
  }
}

export default HallChildRouter;